<!-- 底部分页相关组件 -->
<template>
  <div class="page-bottom flex-center">
    <div
      class="total"
    >
      共{{ pages }}页
    </div>
    <div
      class="jumper"
    >
      <span class="mg-r-s">当前</span>
      <el-input
        v-model.number="jumperPage"
        size="mini"
        class="ctrl-input"
        @change="handleJumper"
      />
      <span>页</span>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    pages: {
      type: Number,
      default: 0,
    },
    value: {
      type: Number,
      default: 1,
    },
  },
  data() {
    return {
      jumperPage: this.value
    };
  },
  watch: {
    value(val) {
      this.jumperPage = val;
    },
  },
  methods: {
    handleJumper() {
      this.$emit('input', this.jumperPage);
    },
  },
};
</script>
<style lang="scss" scoped>
.page-bottom{
  background-color: #555;
  height: 100%;
  .total,
  .sizes,
  .jumper {
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
    line-height: 30px;
  }
  .ctrl-input {
    margin: 0 5px;
    width: 32px;
    ::v-deep .el-input__inner {
      padding: 0 5px;
    }
  }
}
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
